import axios from 'axios'
import server from './server'

const baseUrl = server.baseUrl;
const startUrl = '/public/auth'
/**用户登录*/
export const login = (data) => {
    return axios.post(`${baseUrl}${startUrl}/login`, data, {
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        }
    })    
}

/**用户注册*/
export const register = (data) => {
    return axios.post(`${baseUrl}${startUrl}/register`, data, {
        headers: {
            'Content-Type': 'application/json'
        }
    })
}

/**找回密码*/
export const resetPassword = (data) => {
    return axios.post(`${baseUrl}${startUrl}/resetPassword`, data, {
        headers: {
            'Content-Type': 'application/x-www-form-urlencoded'
        }
    })
}


